﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Xml.Serialization;

namespace Sovigaz.DataProvider
{
    public partial class SovigazDbContext
    {
        public DbSet<OrderLine> OrderLines { get; set; }
    }

    [Table("OrderLines")]
    public class OrderLine : AuditableEntity
    {
        public OrderLine()
        {
            IsActived = true;
            IsDeleted = false;
            OrderRemainQty = 0;
            Size = "L";
        }

        [Key]
        public int OrderLineID { get; set; }

        public int OrderID { get; set; }

        [NotMapped]
        public string OrderCode { get; set; }

        public int CategoryID { get; set; }

        [NotMapped]
        public string CategoryName { get; set; }

        public string Size { get; set; }

        public decimal Capacity { get; set; }

        public int OrderQty { get; set; }

        [NotMapped]
        public int OrderRemainQty { get; set; }

        [NotMapped]
        public int TC { get; set; }

        public string Description { get; set; }
    }

    public class OrderLineComplex
    {
        public int OrderLineID { get; set; }

        public int OrderID { get; set; }

        public string OrderCode { get; set; }

        public int CategoryID { get; set; }

        public string CategoryName { get; set; }

        public string Size { get; set; }

        public decimal Capacity { get; set; }

        public int OrderQty { get; set; }

        [NotMapped]
        public int OrderRemainQty { get; set; }

        public string Description { get; set; }
    }
}